<template>
  <div class="body">
    <div class="body-echart">
      <div class="body-echart-right-0">
        <echartDiv
          :height="height"
          :options="options"
          :width="'154px'"
        />
      </div>
    </div>
  </div>
</template>

<script>
import echartDiv from '@/components/echart/index'

export default {
  name: 'echart2',
  components: {
    echartDiv
  },
  props: {
    options: Object,
    data: Object
  },
  data() {
    return {
      enterpriseArr: [],
      tableArr: [],
      height: 150,
      options1: '',
      options2: '',
      sumbit: '',
      onsumbit: '',
      createTime: ''
    }
  },
  mounted() {},
  methods: {
    copyClick() {
      const copyTest = this.enterpriseArr.join('、') // 提取项目名称并根据条件进行字符串转换
      const inputTest = document.createElement('input')
      inputTest.value = copyTest
      document.body.appendChild(inputTest)
      inputTest.select()
      document.execCommand('Copy')
      inputTest.className = 'oInput'
      inputTest.style.display = 'none'
      this.$message.success('复制成功')
    },
    // table第二列位置样式
    classNameFun(row) {
      if (row.columnIndex === 1) {
        return 'className'
      }
    }
  }
}
</script>

<style scoped lang="scss">
.body {
  width: 100%;
  height: calc(100% - 160px);
  overflow-y: hidden;

  &-echart {
    width: 100%;
    height: 154px;
    display: flex;
    font-family: PingFang SC;

    &-left {
      flex: 1;
      display: flex;
      flex-direction: column;
      align-items: flex-start; /*垂直居中*/
      justify-content: center; /*水平居中*/
      // text-align: center;
      font-size: 16px;
      line-height: 30px;
    }

    &-right-0 {
      flex: 1;

      &::before {
        position: absolute;
        left: 77px;
        top: 75px;
        transform: translate(-50%, -50%);
        display: block;
        content: '';
      }

      &::before {
        width: 126px;
        height: 126px;
        background-image: url('../../../../../public/img/basemaps/echartyuan.png');
        z-index: 2;
      }

      &::after {
        position: absolute;
        left: 77px;
        top: 75px;
        transform: translate(-50%, -50%);
        display: block;
        content: '';
      }

      &::after {
        width: 86px;
        height: 86px;
        background-image: url('../../../../../public/img/basemaps/echartstuotuan.png');
        background-size: 100% 100%;
        z-index: 2;
      }
    }
  }
}
</style>
